// 用户相关状态管理

import { createSlice} from '@reduxjs/toolkit';

const userStore = createSlice({
    name: 'user',
    initialState: {
        token:'',
    },
    reducers: {
        setToken( state, action){
            state.token = action.payload;
        }
    }
})

export const { setToken } = userState.actions

const userReducer = userStore.reducer
export default userReducer